<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">

<head th:include="templates/common :: header" />

<body>

	<div class="container" style="margin-top: 40px;">
		<div th:include="templates/common :: menu" ></div>	
		
	<table th:if="${not #lists.isEmpty(myGrades)}" class="table table-bordered table-striped table-condensed">
			<thead>
				<tr>
					<th scope="col" style="text-align: center !important;" th:text="#{subjects.label}"/>
					<th scope="col" style="text-align: center !important;" th:text="#{teachers.role.name}"/>
					<th scope="col" style="text-align: center !important;" th:text="#{grades.table.grade.partial}" th:attr="colspan=${size}"/>
					<th scope="col" style="text-align: center !important;" th:text="#{grades.table.grade.final}"/>
				</tr>
			</thead>
			<tbody>
				<tr th:each="grade : ${myGrades}">									
					<td th:text="${grade.subjectName}" style="text-align: center; vertical-align: middle;"></td>					
					<td th:text="${grade.teacherName}" style="text-align: center; vertical-align: middle;"></td>					
					<td th:each="partialGrade : ${grade.partialGrades}" style="text-align: center; vertical-align: middle;" th:inline="text">
						<span th:text="${partialGrade.grade}"/>							
					</td>						
					<td th:each="finalGrade : ${grade .finalGrades}" style="text-align: center; vertical-align: middle;" th:inline="text">
						<span th:text="${finalGrade.grade}"/>							
					</td>						
				</tr>
			</tbody>
		</table>		
	</div>	
	
	
	<script type="text/javascript"> 
		$(document).ready(function() {
	    	$('.chzn-select').select2({});	    
	 	});
	</script>	
</body>
</html>